<template>
  <view class="container">
	<xk-header :headerbg="true" class="header" :back="true" title="停车记录详情"></xk-header>
     <view class="infobox">
		 <!-- <view><image class="caricon" mode="widthFix" src="@/static/car.jpeg" ></image></view> -->
		 <view><image class="caricon" mode="widthFix" src="" ></image></view>
		 <u-cell-group :border="false">
		 	<u-cell
		 	    size="large"
		 	    title="停车场"
		 	    value="昂宝大厦B1-A区001"
		 	></u-cell>
		 	<u-cell
		 	    size="large"
		 	    title="入场时间"
		 	    value="2022-12-02 10:11:11"
		 	></u-cell>
			<u-cell
			    size="large"
			    title="停车时长"
			    value="4小时50分"
			></u-cell>
			<u-cell
			    size="large"
			    title="停车费用"
			    value="40元"
			></u-cell>
			<u-cell
			    size="large"
			    title="优惠券抵扣"
			    value="5元"
			></u-cell>
			<u-cell
			    size="large"
			    title="应缴费用"
			    value="35元"
			></u-cell>
			<u-cell
			    size="large"
			    title="已支付"
			    value="35元"
			></u-cell>
			<u-cell
			    size="large"
			    title="缴费时间"
			    value="2022-12-02 14:11:11"
				:border="false"
			></u-cell>
		 </u-cell-group>
	 </view>
  </view>
</template>

<script>
  /* import { setCartTabBadge } from '@/core/app'
  import * as Api from '@/api/page'
  import Page from '@/components/page' */

  const App = getApp()

  export default {
    components: {},
    data() {
      return {
        // 页面参数
        options: {},
        // 页面属性
        page: {},
        // 页面元素
        items: [],
		List:[
			{id:1,carname:'粤A 88666',quyu:'停车场B区 1003',start_time:'2022-11-01 12 :11',end_time:'2022-12-02 14:10'},
			{id:2,carname:'粤A 88666',quyu:'停车场B区 1003',start_time:'2022-11-01 12 :11',end_time:'2022-12-02 14:10'},
			{id:3,carname:'粤A 88666',quyu:'停车场B区 1003',start_time:'2022-11-01 12 :11',end_time:'2022-12-02 14:10'},
			{id:4,carname:'粤A 88666',quyu:'停车场B区 1003',start_time:'2022-11-01 12 :11',end_time:'2022-12-02 14:10'},
			{id:5,carname:'粤A 88666',quyu:'停车场B区 1003',start_time:'2022-11-01 12 :11',end_time:'2022-12-02 14:10'},
			{id:6,carname:'粤A 88666',quyu:'停车场B区 1003',start_time:'2022-11-01 12 :11',end_time:'2022-12-02 14:10'},
			{id:7,carname:'粤A 88666',quyu:'停车场B区 1003',start_time:'2022-11-01 12 :11',end_time:'2022-12-02 14:10'},
			{id:8,carname:'粤A 88666',quyu:'停车场B区 1003',start_time:'2022-11-01 12 :11',end_time:'2022-12-02 14:10'},
		]
      }
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
      // 当前页面参数
      this.options = options
      // 加载页面数据
      //this.getPageData();
    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {

    },

    methods: {
		gotoUrl(e){
		var weburl=e.currentTarget.dataset.url;
		//在起始页面跳转到test.vue页面并传递参数
		uni.navigateTo({
			url:weburl
		});
	  },
      /**
       * 加载页面数据
       * @param {Object} callback
       */
      getPageData(callback) {
        const app = this
        const pageId = app.options.pageId || 0
        Api.detail(pageId)
          .then(result => {
            // 设置页面数据
            const { data: { pageData } } = result
            app.page = pageData.page
            app.items = pageData.items
            // 设置顶部导航栏栏
            app.setPageBar();
          })
          .finally(() => callback && callback())
      },

      /**
       * 设置顶部导航栏
       */
      setPageBar() {
        const {
          page
        } = this
        // 设置页面标题
        uni.setNavigationBarTitle({
          title: page.params.title
        });
        // 设置navbar标题、颜色
        uni.setNavigationBarColor({
          frontColor: page.style.titleTextColor === 'white' ? '#ffffff' : '#000000',
          backgroundColor: page.style.titleBackgroundColor
        })
      },

    },

    /**
     * 下拉刷新
     */
    onPullDownRefresh() {
      // 获取首页数据
      this.getPageData(() => {
        uni.stopPullDownRefresh()
      })
    },

    /**
     * 分享当前页面
     */
    onShareAppMessage() {
      const app = this
      const { page } = app
      return {
        title: page.params.share_title,
        path: "/pages/index/index?" + app.$getShareUrlParams()
      }
    },

    /**
     * 分享到朋友圈
     * 本接口为 Beta 版本，暂只在 Android 平台支持，详见分享到朋友圈 (Beta)
     * https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share-timeline.html
     */
    onShareTimeline() {
      const app = this
      const { page } = app
      return {
        title: page.params.share_title,
        path: "/pages/index/index?" + app.$getShareUrlParams()
      }
    }

  }
</script>

<style lang="scss" scoped>
   page{
		background:#F5F5F5!important;
	}
  .container {
    background: #F5F5F5;
  }
  .infobox{
	  background-color:#FFFFFF;
	  border-bottom:1px solid #F1F1F1;
	  font-size:28rpx;
	  padding:10rpx 10rpx 10rpx 10rpx;
	  margin:20rpx;
	  border-radius:12rpx;
  }
  .box1{
	  text-align:center;
  }
  .caricon{
	 background:#FFFFFF;
	 text-align:center;
	 width:100%;
	 height:80rpx;
	 margin:0px auto;
	 border-radius:10rpx;
  }
  .title1{
	  font-size:32rpx;
  }
  .title2{
  	  font-size:26rpx;
	  color:#999;
	  padding:10rpx 0rpx 10rpx 0rpx;
  }
  .title3{
  	  font-size:26rpx;
	  color:#999;
  }
  .loadtext{
  	  text-align:center;
  	  padding:30rpx 0 50rpx 0;
  	  font-size:24rpx;
  	  color: #999;
  }
</style>
